package com.example.MyThread.waitandontify01;

/**
 * @author Jason
 * @PACKAGE_NAME com.example.MyThread.waitandontify01
 * @Description
 * @date 2023-12-10 22:10
 */
public class ThreadDemo {
    /**
     * 需求：完成生产者和消费者（等待唤醒机制）的代码
     * 实现线程轮流切换效果
     */

    public static void main(String[] args) {
        //创建线程对象
        Cook c = new Cook();
        Foodie f = new Foodie();

        //给线程设置名称
        c.setName("厨师");
        f.setName("吃货");

        c.start();
        f.start();

    }
}
